Reversible debuggers and process replay have been developed at least since1970. This vision enables one to execute backwards in time under a debugger.Two important problems in practice are that, first, current reversibledebuggers are slow when reversing over long time periods, and, second, afterbuilding one reversible debugger, it is difficult to transfer that achievementto a new programming environment. The user observes a bug when arriving at anerror. Searching backwards for the corresponding fault may require many reversesteps. Ultimately, the user prefers to write an expression that will transitionto false upon arriving at the fault. The solution is an expression-transitionwatchpoint facility based on top of snapshots and record/replay.Expression-transition watch- points are implemented as binary search throughthe timeline of a program execution, while using the snapshots as landmarkswithin that timeline. This allows for debugging of subtle bugs that appear onlyafter minutes or more of program execution. When a bug occurs within seconds ofprogram startup, repeated debugging sessions suffice. Reversible debugging ispreferred for bugs seen only after minutes. This architecture allows for anefficient and easy-to-write snapshot-based reversibe debugger on top of aconventional debugger. The validity of this approach was tested by developingfour personalities (for GDB, MATLAB, Perl, and Python), with each personalitytypically requiring just 100 lines of code.
展开▼